package com.ruoyi.production.service.impl.blade;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.production.domain.blade.BladePurchaseApply;
import com.ruoyi.production.mapper.blade.BladePurchaseApplyMapper;
import com.ruoyi.production.service.blade.IBladePurchaseApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 刀片购买申请Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-11
 */
@Service
public class BladePurchaseApplyServiceImpl implements IBladePurchaseApplyService
{
    @Autowired
    private BladePurchaseApplyMapper bladePurchaseApplyMapper;

    /**
     * 查询刀片购买申请
     *
     * @param bladePurchaseApplyId 刀片购买申请ID
     * @return 刀片购买申请
     */
    @Override
    public BladePurchaseApply selectBladePurchaseApplyById(Long bladePurchaseApplyId)
    {
        return bladePurchaseApplyMapper.selectBladePurchaseApplyById(bladePurchaseApplyId);
    }

    /**
     * 查询刀片购买申请列表
     *
     * @param bladePurchaseApply 刀片购买申请
     * @return 刀片购买申请
     */
    @Override
    public List<BladePurchaseApply> selectBladePurchaseApplyList(BladePurchaseApply bladePurchaseApply)
    {
        return bladePurchaseApplyMapper.selectBladePurchaseApplyList(bladePurchaseApply);
    }

    /**
     * 新增刀片购买申请
     *
     * @param bladePurchaseApply 刀片购买申请
     * @return 结果
     */
    @Override
    public int insertBladePurchaseApply(BladePurchaseApply bladePurchaseApply)
    {
        bladePurchaseApply.setCreateTime(DateUtils.getNowDate());
        return bladePurchaseApplyMapper.insertBladePurchaseApply(bladePurchaseApply);
    }

    /**
     * 修改刀片购买申请
     *
     * @param bladePurchaseApply 刀片购买申请
     * @return 结果
     */
    @Override
    public int updateBladePurchaseApply(BladePurchaseApply bladePurchaseApply)
    {
        bladePurchaseApply.setUpdateTime(DateUtils.getNowDate());
        return bladePurchaseApplyMapper.updateBladePurchaseApply(bladePurchaseApply);
    }

    /**
     * 批量删除刀片购买申请
     *
     * @param bladePurchaseApplyIds 需要删除的刀片购买申请ID
     * @return 结果
     */
    @Override
    public int deleteBladePurchaseApplyByIds(Long[] bladePurchaseApplyIds)
    {
        return bladePurchaseApplyMapper.deleteBladePurchaseApplyByIds(bladePurchaseApplyIds);
    }

    /**
     * 删除刀片购买申请信息
     *
     * @param bladePurchaseApplyId 刀片购买申请ID
     * @return 结果
     */
    @Override
    public int deleteBladePurchaseApplyById(Long bladePurchaseApplyId)
    {
        return bladePurchaseApplyMapper.deleteBladePurchaseApplyById(bladePurchaseApplyId);
    }
}
